<template>
	<view class="agent-base-info-layout">
		<!-- 用户名和头像 -->
		<view class="user-box">
			<image class="user-photo" src="/static/operate/agent_photo.png" mode="aspectFit"></image>
			<text>{{dataInfo.agentName}}</text>
		</view>
		
		<!--  -->
		<view class="user-form">
			<view class="user-form-item">
				<text>代理商编号</text>
				<text>{{dataInfo.agentId}}</text>
				<view class="line"></view>
			</view>
			<view class="user-form-item">
				<text>代理商名称</text>
				<text>{{dataInfo.agentName}}</text>
				<view class="line"></view>
			</view>
			<view class="user-form-item">
				<text>代理商类型</text>
				<text>{{dataInfo.agentType == '02' ? '企业' : '个人'}}</text>
				<view class="line"></view>
			</view>
			<view class="user-form-item">
				<text>手机号</text>
				<text>{{dataInfo.tel}}</text>
				<view class="line"></view>
			</view>
			<uv-gap height="20rpx" bgColor="#f7f7f7"></uv-gap>
			<view class="user-form-item">
				<text>认证时间</text>
				<text>{{dataInfo.authTime}}</text>
				<view class="line"></view>
			</view>
			<view class="user-form-item">
				<text>最后一次登录时间</text>
				<text>{{dataInfo.lastLogin}}</text>
				<view class="line"></view>
			</view>
		</view>
		<!--  -->
	</view>
</template>

<script setup>
	const props = defineProps(['data'])
	const dataInfo = JSON.parse(decodeURIComponent(props.data || '{}'))
	console.log(dataInfo)
</script>

<style lang="scss" scoped>
	
.agent-base-info-layout{
	background-color: $xh-bg-color;
	.user-box{
		display: flex;
		flex-direction: column;
		align-items: center;
		background-color: #ffffff;
		padding: 30rpx;
		.user-photo{
			width: 96rpx;
			height: 96rpx;
			margin-bottom: 20rpx;
		}
		margin-bottom: 20rpx;
	}
	.user-form{
		background-color: #ffffff;
		.user-form-item{
			display: flex;
			align-items: center;
			justify-content:space-between;
			padding: 30rpx 30rpx;
			position: relative;
		}
	}
	
	
}
</style>
